home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games to Treasure
/
Games to Treasure - Disc 1.iso
/
setup.bat
< prev
next >
Wrap
DOS Batch File
|
1994-03-04
|
3KB
|
119 lines
@echo off
if not exist .\cdidx\cs\pic\emerald.gif goto fail
goto end0
:fail
cls
echo.
echo.
echo Sorry, you are on the wrong drive. Move to CD-ROM drive before executing.
echo.
pause
echo.
goto end0
:end0
mode co80
@echo off
set derml=
set envtest1=
set envtest2=
set cdidxt=
set cdr=
set cdidx=
set CDT=
set bd=
set goinst=
cls
echo Checking to see if you are on the correct drive...
if not exist .\cdidx\cdidx.exe goto oops
echo Checking your available environment space...
set envtest1=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
set envtest2=xxxxxxxxxxxxxxx
if xxxxxxxxxxxxxxx == %envtest2% goto envok
set envtest1=
set envtest2=
goto envnok
:envok
set envtest1=
set envtest2=
echo Environment space adequate.
goto envcont
:envnok
cls
echo.
echo.
echo.
echo !!!!!! WARNING !!!!!!
echo.
echo You do not have enough environment space to install the CdIdx variables.
echo Please consult your DOS manual about expanding it. You need at least
echo 70 bytes of free environment space to complete the SETUP and INSTALL processes.
echo.
set cont=n
pause
cls
goto end
:envcont
echo @echo off >c:\tmp.bat
echo Determining which drive is your CD-ROM drive...
cd >c:\tmp1.dat
\cdidx\cstring -f1 -d: <c:\tmp1.dat >c:\tmp2.dat
\cdidx\strdt s/^/"set CDR=" <c:\tmp2.dat >>c:\tmp.bat
echo Determining your boot drive...
set >c:\tmp1.dat
\cdidx\fstring "COMSPEC=" <c:\tmp1.dat >c:\tmp2.dat
\cdidx\cstring -c9-9 <c:\tmp2.dat >c:\tmp3.dat
\cdidx\strdt s/^/"set BD=" <c:\tmp3.dat >>c:\tmp.bat
echo Setting Environment Variables (Running generated C:\TMP.BAT)...
call c:\tmp.bat
echo Cleanup: Erasing C:\tmp1.dat, C:\tmp2.dat, C:\tmp3.dat...
erase C:\tmp1.dat
erase C:\tmp2.dat
erase C:\tmp3.dat
echo.
echo.
echo NOTICE:
echo.
echo Directory Creation may fail if directory C:\CDIDXTMP already exists.
echo This is not a problem, just shows you have installed CdIdx before.
echo.
pause
echo.
echo Attemping to create %bd%:\cdidxtmp directory...
md %bd%:\cdidxtmp >\nul
set CDT=\cdidxtmp
set cdidx=%bd%%cdr%1%CDT%
echo Setup finished.
echo.
echo Boot drive was found to be drive: %bd%:
echo CD-ROM drive was found to be drive: %cdr%:
echo.
echo If this is INCORRECT, you may need to run MSETUP to specify them.
echo.
goto end
:oops
cls
echo.
echo.
echo.
echo !!!!! WARNING !!!!!
echo.
echo You must make the drive you run SETUP.BAT from your default drive.
goto end
:end
echo.